\(\int \frac {a+b \log (c x^n)}{(d+e x)^2} \, dx\) [42]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 39 \[ \int \frac {a+b \log \left (c x^n\right )}{(d+e x)^2} \, dx=\frac {x \left (a+b \log \left (c x^n\right )\right )}{d (d+e x)}-\frac {b n \log (d+e x)}{d e} \]

[Out]

x*(a+b*ln(c*x^n))/d/(e*x+d)-b*n*ln(e*x+d)/d/e

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2351, 31} \[ \int \frac {a+b \log \left (c x^n\right )}{(d+e x)^2} \, dx=\frac {x \left (a+b \log \left (c x^n\right )\right )}{d (d+e x)}-\frac {b n \log (d+e x)}{d e} \]

[In]

Int[(a + b*Log[c*x^n])/(d + e*x)^2,x]

[Out]

(x*(a + b*Log[c*x^n]))/(d*(d + e*x)) - (b*n*Log[d + e*x])/(d*e)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp[x*(d + e*x^r)^(q +
 1)*((a + b*Log[c*x^n])/d), x] - Dist[b*(n/d), Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q,
r}, x] && EqQ[r*(q + 1) + 1, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {x \left (a+b \log \left (c x^n\right )\right )}{d (d+e x)}-\frac {(b n) \int \frac {1}{d+e x} \, dx}{d} \\ & = \frac {x \left (a+b \log \left (c x^n\right )\right )}{d (d+e x)}-\frac {b n \log (d+e x)}{d e} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.05 \[ \int \frac {a+b \log \left (c x^n\right )}{(d+e x)^2} \, dx=\frac {-\frac {a+b \log \left (c x^n\right )}{d+e x}+\frac {b n (\log (x)-\log (d+e x))}{d}}{e} \]

[In]

Integrate[(a + b*Log[c*x^n])/(d + e*x)^2,x]

[Out]

(-((a + b*Log[c*x^n])/(d + e*x)) + (b*n*(Log[x] - Log[d + e*x]))/d)/e

Maple [A] (verified)

Time = 0.40 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.38

method result size
parallelrisch \(-\frac {\ln \left (e x +d \right ) b e n x +\ln \left (e x +d \right ) b d n -b e x \ln \left (c \,x^{n}\right )-a e x}{d \left (e x +d \right ) e}\) \(54\)
risch \(-\frac {b \ln \left (x^{n}\right )}{e \left (e x +d \right )}-\frac {-i \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b d \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b d \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-2 \ln \left (-x \right ) b e n x +2 \ln \left (e x +d \right ) b e n x -2 \ln \left (-x \right ) b d n +2 \ln \left (e x +d \right ) b d n +2 d b \ln \left (c \right )+2 a d}{2 \left (e x +d \right ) e d}\) \(173\)

[In]

int((a+b*ln(c*x^n))/(e*x+d)^2,x,method=_RETURNVERBOSE)

[Out]

-(ln(e*x+d)*b*e*n*x+ln(e*x+d)*b*d*n-b*e*x*ln(c*x^n)-a*e*x)/d/(e*x+d)/e

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.31 \[ \int \frac {a+b \log \left (c x^n\right )}{(d+e x)^2} \, dx=\frac {b e n x \log \left (x\right ) - b d \log \left (c\right ) - a d - {\left (b e n x + b d n\right )} \log \left (e x + d\right )}{d e^{2} x + d^{2} e} \]

[In]

integrate((a+b*log(c*x^n))/(e*x+d)^2,x, algorithm="fricas")

[Out]

(b*e*n*x*log(x) - b*d*log(c) - a*d - (b*e*n*x + b*d*n)*log(e*x + d))/(d*e^2*x + d^2*e)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 153 vs. \(2 (31) = 62\).

Time = 0.62 (sec) , antiderivative size = 153, normalized size of antiderivative = 3.92 \[ \int \frac {a+b \log \left (c x^n\right )}{(d+e x)^2} \, dx=\begin {cases} \tilde {\infty } \left (- \frac {a}{x} - \frac {b n}{x} - \frac {b \log {\left (c x^{n} \right )}}{x}\right ) & \text {for}\: d = 0 \wedge e = 0 \\\frac {a x - b n x + b x \log {\left (c x^{n} \right )}}{d^{2}} & \text {for}\: e = 0 \\\frac {- \frac {a}{x} - \frac {b n}{x} - \frac {b \log {\left (c x^{n} \right )}}{x}}{e^{2}} & \text {for}\: d = 0 \\- \frac {a d}{d^{2} e + d e^{2} x} - \frac {b d n \log {\left (\frac {d}{e} + x \right )}}{d^{2} e + d e^{2} x} - \frac {b e n x \log {\left (\frac {d}{e} + x \right )}}{d^{2} e + d e^{2} x} + \frac {b e x \log {\left (c x^{n} \right )}}{d^{2} e + d e^{2} x} & \text {otherwise} \end {cases} \]

[In]

integrate((a+b*ln(c*x**n))/(e*x+d)**2,x)

[Out]

Piecewise((zoo*(-a/x - b*n/x - b*log(c*x**n)/x), Eq(d, 0) & Eq(e, 0)), ((a*x - b*n*x + b*x*log(c*x**n))/d**2,
Eq(e, 0)), ((-a/x - b*n/x - b*log(c*x**n)/x)/e**2, Eq(d, 0)), (-a*d/(d**2*e + d*e**2*x) - b*d*n*log(d/e + x)/(
d**2*e + d*e**2*x) - b*e*n*x*log(d/e + x)/(d**2*e + d*e**2*x) + b*e*x*log(c*x**n)/(d**2*e + d*e**2*x), True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.62 \[ \int \frac {a+b \log \left (c x^n\right )}{(d+e x)^2} \, dx=-b n {\left (\frac {\log \left (e x + d\right )}{d e} - \frac {\log \left (x\right )}{d e}\right )} - \frac {b \log \left (c x^{n}\right )}{e^{2} x + d e} - \frac {a}{e^{2} x + d e} \]

[In]

integrate((a+b*log(c*x^n))/(e*x+d)^2,x, algorithm="maxima")

[Out]

-b*n*(log(e*x + d)/(d*e) - log(x)/(d*e)) - b*log(c*x^n)/(e^2*x + d*e) - a/(e^2*x + d*e)

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.64 \[ \int \frac {a+b \log \left (c x^n\right )}{(d+e x)^2} \, dx=-\frac {b n \log \left (x\right )}{e^{2} x + d e} - \frac {b n \log \left (e x + d\right )}{d e} + \frac {b n \log \left (x\right )}{d e} - \frac {b \log \left (c\right ) + a}{e^{2} x + d e} \]

[In]

integrate((a+b*log(c*x^n))/(e*x+d)^2,x, algorithm="giac")

[Out]

-b*n*log(x)/(e^2*x + d*e) - b*n*log(e*x + d)/(d*e) + b*n*log(x)/(d*e) - (b*log(c) + a)/(e^2*x + d*e)

Mupad [B] (verification not implemented)

Time = 1.32 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.38 \[ \int \frac {a+b \log \left (c x^n\right )}{(d+e x)^2} \, dx=-\frac {a}{x\,e^2+d\,e}-\frac {b\,\ln \left (c\,x^n\right )}{e\,\left (d+e\,x\right )}-\frac {2\,b\,n\,\mathrm {atanh}\left (\frac {2\,e\,x}{d}+1\right )}{d\,e} \]

[In]

int((a + b*log(c*x^n))/(d + e*x)^2,x)

[Out]

- a/(d*e + e^2*x) - (b*log(c*x^n))/(e*(d + e*x)) - (2*b*n*atanh((2*e*x)/d + 1))/(d*e)